<?php

    class Userlog extends CI_Model{

        function __construct(){
            parent::__construct();
        }

        function addaction($action_str,$asset_id=NULL){
            
            $data = array(
                'user_id' => $this->session->userdata('id'), 
                'action_value'=>$action_str,
                'asset_id'=>$asset_id,
                'datetime'=>time()
            );
            $this->db->insert('useraction', $data);
        }

    }

?>
